<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
    .grid-container {
      /* 网格布局 */
      width: 600px;
      display: inline-grid;
      /* 定义2行，每一行高为100px */
      grid-template-rows: 100px 100px;
      /*
            定义3列，3列分别占容器总宽的 份数 1份 2份 3份
            第1列宽 =600px * 1/(1+2+3)=100px
            第2列宽 =600px * 2/(1+2+3)=200px
            第3列宽 =600px * 3/(1+2+3)=300px
        */
      grid-template-columns: 1fr 2fr 3fr;
      margin: 100px;
    }
  </style>
</head>
<body>
  <div class="grid-container">
    <div class="grid-item">1</div>
    <div class="grid-item">2</div>
    <div class="grid-item">3</div>
    <div class="grid-item">4</div>
    <div class="grid-item">5</div>
    <div class="grid-item">6</div>
  </div>
</body>
</html>